<style lang="scss">
#cmain {
  .mainContent {
    min-height: 425px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0px 0px 15px 0px rgba(207, 207, 207, 1);
    padding-top: 10px;
    padding: 0px 30px;
    .mainContentLeft{
        float: left;
        width: 40%;
        margin-left: 10%
    }
    .mainContentRight{
        float: right;
        width: 45%;
        margin-left: 5%
    }
    .clearfix span {
        left: 290px;
        top: 132px;
        width: 115px;
        height: 23px;
        line-height: 23px;
        color: rgba(102, 102, 102, 1);
        font-size: 16px;
        text-align: center;
        font-family: Roboto;

    }
    .el-input--mini .el-input__inner {
            width: 202px;
        }
  }
  .el-icon-plus:before {
        color: #337aba;
        font-size: 20px;
        font-weight: 800;
        cursor: pointer;
    }
    .el-icon-minus:before {
        color: #e51c23;
        font-size: 20px;
        font-weight: 800;
        cursor: pointer;
    }
}
</style>

<template>
    <div id = "cmain" class="family-tree-mask" v-loading="loading" element-loading-text="数据加载中，请稍等......">
        <div class="mainContent">
            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <span>临床与治疗信息</span>
                </div>
                <div class="text item">
                    <div class="mainContentLeft">
                        <el-form ref="form" :model="datas" label-width="140px" :label-position="labelPosition" size='mini'>
                            <el-form-item label="组织病理类型">
                                <el-select v-model="datas.histopathological_type" placeholder="请选择">
                                    <el-option label="甲状腺髓样癌" value="1"></el-option>
                                    <el-option label="甲状腺非髓样癌" value="2"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="" v-if="datas.histopathological_type=='2'">
                                <el-select v-model="datas.tnc" placeholder="请选择">
                                    <el-option label="乳头状" value="1"></el-option>
                                    <el-option label="甲状腺筛状－桑葚状乳头状癌" value="2"></el-option>
                                    <el-option label="滤泡状" value="3"></el-option>
                                    <el-option label="未分化" value="4"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="TNM分期">
                                <el-select v-model="datas.tnm_stage_type" placeholder="请选择" @change='changeTNMPG'>
                                    <el-option label="乳头状或滤泡样癌（分化良好）45岁以下" value="1"></el-option>
                                    <el-option label="乳头状或滤泡样癌 45岁及以上" value="2"></el-option>
                                    <el-option label="髓样癌（所有年龄）" value="3"></el-option>
                                    <el-option label="未分化癌" value="4"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="T">
                                <el-select v-model="datas.TNM_T" placeholder="请选择" @change='changeTNMPG'>
                                    <el-option label="Tx" value="Tx"></el-option>
                                    <el-option label="T1" value="T1"></el-option>
                                    <el-option label="T2" value="T2"></el-option>
                                    <el-option label="T3" value="T3"></el-option>
                                    <el-option label="T4a" value="T4a"></el-option>
                                    <el-option label="T4b" value="T4b"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="N">
                                <el-select v-model="datas.TNM_N" placeholder="请选择" @change='changeTNMPG'>
                                    <el-option label="Nx" value="Nx"></el-option>
                                    <el-option label="N0" value="N0"></el-option>
                                    <el-option label="N1a" value="N1a"></el-option>
                                    <el-option label="N1b" value="N1b"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="M">
                                <el-select v-model="datas.TNM_M" placeholder="请选择" @change='changeTNMPG'>
                                    <el-option label="M0" value="M0"></el-option>
                                    <el-option label="M1" value="M1"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="">
                                <!-- <el-input v-model="datas.clinicalAnalysis" readonly='readonly'></el-input> -->
                                <div>
                                    {{datas.clinicalAnalysis}}
                                </div>
                            </el-form-item>



                            <el-form-item label="手术方案">
                                <el-select v-model="datas.surgery" placeholder="请选择">
                                    <el-option label="全甲状腺切除术" value="1"></el-option>
                                    <el-option label="次全甲状腺切除术" value="2"></el-option>
                                </el-select>
                            </el-form-item>

                            


                        </el-form>    
                    </div>
                    <div class="mainContentRight">
                        <el-form ref="form" :model="datas" label-width="240px" :label-position="labelPosition" size='mini'>
                            <el-form-item label="是否有先天性巨结肠">
                                <el-radio-group v-model="datas.noMa">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="是否使用放射碘治疗">
                                <el-select v-model="datas.radioiodine_therapy" placeholder="请选择">
                                    <el-option label="I131" value="1"></el-option>
                                    <el-option label="I123" value="2"></el-option>
                                </el-select>                          
                            </el-form-item>

                            <el-form-item label="是否有多发性粘膜神经瘤">
                                <el-radio-group v-model="datas.noMMN">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="是否有颈部淋巴结肿大">
                                <el-radio-group v-model="datas.noCLN">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="双侧患癌">
                                <el-radio-group v-model="datas.yesCancer">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="对侧患癌年龄">
                                <el-input v-model="datas.lateral_cancer_age"></el-input>
                            </el-form-item>

                            <el-form-item label="单侧多灶性">
                                <el-radio-group v-model="datas.noUM">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="是否为碘抵抗">
                                <el-radio-group v-model="datas.noIr">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="是否有慢性淋巴细胞性甲状腺炎">
                                <el-radio-group v-model="datas.noCLT">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="是否有纤维性甲状腺炎">
                                <el-radio-group v-model="datas.noFt">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="是否有甲状腺功能亢进">
                                <el-radio-group v-model="datas.noHyper">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="是否有皮肤苔藓淀粉样病变">
                                <el-radio-group v-model="datas.noCMAL">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="是否进行过靶向治疗">
                                <el-radio-group v-model="datas.noTarget">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="是否有马凡样体形">
                                <el-radio-group v-model="datas.noMs">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="是否有亚急性甲状腺炎">
                                <el-radio-group v-model="datas.noST">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>



                        </el-form>
                    </div>   
                </div>
            </el-card>

            <!--遗传性肿瘤综合征表型信息-->
            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <span>遗传性肿瘤综合征表型信息</span>
                </div>
                <div class="text item">
                    <div class="mainContentLeft">
                        <el-form ref="form" :model="datas" label-width="200px" :label-position="labelPosition" size='mini'>
                            <el-form-item label="患有腺瘤性息肉">
                                <el-radio-group v-model="datas.noAut">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>                                  
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="个数" v-if='datas.noAut==1'>
                                <el-input v-model="datas.adenomatous_polyps_num"></el-input>
                            </el-form-item>

                            <el-form-item label="胃肠道错构瘤/神经节瘤">
                                <el-radio-group v-model="datas.noSco">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="个数" v-if='datas.noSco==1'>
                                <el-input v-model="datas.scoNum"></el-input>
                            </el-form-item>

                            <el-form-item label="食道糖原棘皮症">
                                <el-radio-group v-model="datas.noDys">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="个数" v-if='datas.dysNum==1'>
                                <el-input v-model="datas.glycogen_num"></el-input>
                            </el-form-item>

                            <el-form-item label="患有脂肪瘤">
                                <el-radio-group v-model="datas.noLipoma">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="个数" v-if='datas.noLipoma==1'>
                                <el-input v-model="datas.lipoma_num"></el-input>
                            </el-form-item>

                            <el-form-item label="患有前额斑块">
                                <el-radio-group v-model="datas.noForehead">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio> 
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="脑皮质结节">
                                <el-radio-group v-model="datas.noCorT">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="牙釉质凹陷">
                                <el-radio-group v-model="datas.noEnamel">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="错构瘤性直肠息肉">
                                <el-radio-group v-model="datas.noPreP">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="“斑驳状”皮肤改变">
                                <el-radio-group v-model="datas.noMSC">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="“非肾脏错构瘤">
                                <el-radio-group v-model="datas.noNRHo">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="视网膜色素缺失斑块">
                                <el-radio-group v-model="datas.noPD">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="患多发性或双侧性先天性视网膜色素上皮肥大">
                                <el-radio-group v-model="datas.noRe">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="生殖器官异常">
                                <el-checkbox-group v-model="datas.genital_anomaly">
                                    <el-checkbox label="阴茎斑点状色素沉着" name="type"></el-checkbox><br>
                                    <el-checkbox label="睾丸脂肪增多" name="type"></el-checkbox>
                                </el-checkbox-group>
                            </el-form-item>

                            <el-form-item label="色素脱失斑">
                                <el-radio-group v-model="datas.noSpots">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="个数" v-if='datas.noSpots==1'>
                                <el-input v-model="datas.pigmentation_num"></el-input>
                            </el-form-item>

                            <el-form-item label="成人 Lhermitte– Duclos病史">
                                <el-radio-group v-model="datas.noLD">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="肢端肥大症">
                                <el-radio-group v-model="datas.noAcr">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="蓝痣（多发）">
                                <el-radio-group v-model="datas.noBN">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="多发性甲状腺结节">
                                <el-radio-group v-model="datas.noTN">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="智力损伤（IQ≤75）">
                                <el-radio-group v-model="datas.noMD">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="血管异常（包括多发颅内静脉发育异常）">
                                <el-radio-group v-model="datas.noVA">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>


                            

                        </el-form>


                    </div>

                    <div class="mainContentRight">
                        <el-form ref="form" :model="datas" label-width="240px" :label-position="labelPosition" size='mini'>
                            <el-form-item label="大头畸形">
                                <el-select v-model="datas.big_head_deformities" placeholder="请选择">
                                    <el-option label="<58cm" value="1"></el-option>
                                    <el-option label="58cm-60cm" value="2"></el-option>
                                    <el-option label=">60cm" value="2"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="鲛鱼皮斑（结缔组织痣）">
                                <el-radio-group v-model="datas.noShagreen">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="室管膜下结节">
                                <el-radio-group v-model="datas.noSub">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="原发性色素性结节状肾上腺皮质病">
                                <el-radio-group v-model="datas.noACD">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="骨囊肿">
                                <el-radio-group v-model="datas.noBC">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="多发性肾囊肿">
                                <el-radio-group v-model="datas.noMRC">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="幼年性息肉病家族史">
                                <el-radio-group v-model="datas.juvenile_family">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="脑白质辐射状移行线">
                                <el-radio-group v-model="datas.noWMB">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="确诊为成年早老综合征">
                                <el-radio-group v-model="datas.noOAS">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="皮肤色素沉着：嘴唇、眼结膜、内外锥体、阴道或阴茎黏膜">
                                <el-radio-group v-model="datas.noSkin">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                          
                            </el-form-item>

                            <el-form-item label="皮肤黏膜病变" >
                                <div>
                                    <el-checkbox v-model="datas.trichilemoma">毛鞘瘤</el-checkbox>
                                    <el-radio-group v-model="datas.trichilemoma_number" v-if='datas.trichilemoma==true'>
                                        <el-radio label="2" >＜3个</el-radio>
                                        <el-radio label="1" >≥3个</el-radio>
                                    </el-radio-group>                              
                                    
                                </div>
                                <div>
                                   <el-checkbox v-model="datas.acrokeratoderma">肢端角化</el-checkbox>
                                    <el-radio-group v-model="datas.acrokeratoderma_number" v-if='datas.acrokeratoderma==true'>
                                        <el-radio label="2" >＜3个</el-radio>
                                        <el-radio label="1" >≥3个</el-radio>
                                    </el-radio-group>     
                                </div>
                                <div>
                                    <el-checkbox v-model="datas.mucocutaneous_neuromata">皮肤黏膜神经瘤</el-checkbox>
                                    <el-radio-group v-model="datas.mnn" v-if='datas.mucocutaneous_neuromata==true'>
                                        <el-radio label="2" >＜3个</el-radio>
                                        <el-radio label="1" >≥3个</el-radio>
                                    </el-radio-group>
                                </div>
                                <div>
                                    <el-checkbox v-model="datas.oral_papilloma">口腔乳头瘤</el-checkbox>
                                    <el-radio-group v-model="datas.oral_papilloma_num" v-if='datas.oral_papilloma==true'>
                                        <el-radio label="2" >＜3个</el-radio>
                                        <el-radio label="1" >≥3个</el-radio>
                                    </el-radio-group>
                                </div>
                                
                            </el-form-item>



                        </el-form>
                    </div>
                </div>
            </el-card>

            <!--基因检测信息-->
            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <span>基因检测信息</span>
                </div>
                <div class="text item gene-item">
                    <template>
                        <el-table
                            type=index
                            :data="datas.results"
                            border
                            style="width: 100%">

                            <el-table-column
                            fixed="left"
                            label="操作">
                            <template slot-scope="scope">
                                <i class="el-icon-plus" @click="addGen(scope.$index)"></i>
                                <i class="el-icon-minus" @click="removeGen(scope.$index)"></i>
                            </template>
                            </el-table-column>

                            <el-table-column
                            fixed
                            contentEditable
                            prop="detection_result_gene"
                            label="基因"
                            width="240">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.detection_result_gene" placeholder="只能输入大写字母和数字"></el-input>
                            </template>
                            </el-table-column>

                            <el-table-column
                            prop="detection_result_trans"
                            label="转录本号"
                            width="240">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.detection_result_trans" placeholder="请输入转录本号"></el-input>
                            </template>
                            </el-table-column>

                            <el-table-column
                            prop="detection_result_varia"
                            label="变异位点"
                            width="240">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.detection_result_varia" placeholder="请输入变异位点"></el-input>
                            </template>
                            </el-table-column>

                            <el-table-column
                            label="检测类型">
                            <template slot-scope="scope">
                                    <el-select v-model="scope.row.assay_type" placeholder="请选择">
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option label="全基因组" value="1"></el-option>
                                        <el-option label="全外显子检测" value="2"></el-option>
                                        <el-option label="panel检测" value="3"></el-option>
                                        <el-option label="sanger测序" value="4"></el-option>
                                        <el-option label="MLPA" value="5"></el-option>

                                    </el-select>                             
                            </template>
                            </el-table-column>

                            <el-table-column
                            label="功能改变">
                            <template slot-scope="scope">
                               
                                    <el-select v-model="scope.row.functional_change" placeholder="请选择" v-if='scope.row.functional_change!="6"'>
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option label="错义突变" value="1"></el-option>
                                        <el-option label="无义突变" value="2"></el-option>
                                        <el-option label="移码突变" value="3"></el-option>
                                        <el-option label="同义突变" value="4"></el-option>
                                        <el-option label="剪接位点突变" value="5"></el-option>
                                        <el-option label="其他" value="6"></el-option>

                                    </el-select>
                                    <div v-else>
                                        <el-input v-model="scope.row.other_function_change"></el-input>
                                        <i class="el-icon-error" @click="goBackSelect(scope.row)"></i>
                                    </div>
                                    
                                    
                               
                            </template>
                            </el-table-column>

                            <el-table-column
                            label="突变类型">
                            <template slot-scope="scope">
                               
                                    <el-select v-model="scope.row.mutation_type" placeholder="请选择">
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option label="致病的" value="1"></el-option>
                                        <el-option label="可能致病的" value="2"></el-option>
                                        <el-option label="意义不明确的" value="3"></el-option>
                                        <el-option label="可能良性的" value="4"></el-option>
                                        <el-option label="良性的" value="5"></el-option>

                                    </el-select>
                               
                            </template>
                            </el-table-column>
                            
                            
                        </el-table>
                    </template>



                </div>
            </el-card>

            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <span>生活方式</span>
                </div> 
                <div class="text item">
                    <div class="mainContentLeft">
                        <el-form ref="form" :model="datas" label-width="140px" :label-position="labelPosition" size='mini'>
                            <el-form-item label="吸烟">
                                <el-radio-group v-model="datas.smoking">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                        
                            </el-form-item>
                            <el-form-item label="" v-if='datas.smoking==1' label-width="200px">
                                <el-input size="small" v-model="datas.smoking_cycle"  style='width:50px'></el-input> &nbsp;&nbsp;包/周&nbsp;X&nbsp;                  
                                <el-input size="small" v-model="datas.smoking_year" style='width:50px'></el-input>  &nbsp;&nbsp;年               
                            </el-form-item>


                            <el-form-item label="饮酒">
                                <el-radio-group v-model="datas.drink">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                        
                            </el-form-item>


                            <el-form-item label="" v-if='datas.drink==1' label-width="200px">
                                <el-input size="small" v-model="datas.drink_cycle"  style='width:50px'></el-input> &nbsp;&nbsp;次/周                              
                            </el-form-item>

                            <el-form-item label="高脂高红肉类饮食">
                                <el-radio-group v-model="datas.fatty_meat">
                                    <el-radio label="1" >是</el-radio>
                                    <el-radio label="2" >否</el-radio>
                                </el-radio-group>                        
                            </el-form-item>



                        </el-form>    
                    </div>
                    <div class="mainContentRight">
                        <el-form ref="form" :model="datas" label-width="140px" :label-position="labelPosition" size='mini'>
                            <el-form-item label="每日蔬菜摄入量">
                                <el-select v-model="datas.vegetable_consum" placeholder="请选择">
                                    <el-option label="≥500mg" value="1"></el-option>
                                    <el-option label="＜500mg" value="2"></el-option>
                                </el-select>
                             </el-form-item>

                             <el-form-item label="每日运动消耗量">
                                <el-select v-model="datas.dec" placeholder="请选择">
                                    <el-option label="基本无运动量" value="1"></el-option>
                                    <el-option label="30-50大卡" value="2"></el-option>
                                    <el-option label="50-100大卡" value="3"></el-option>
                                    <el-option label="100-200大卡" value="4"></el-option>
                                    <el-option label="200-300大卡" value="5"></el-option>
                                    <el-option label="＞300大卡" value="6"></el-option>
                                </el-select>
                             </el-form-item>

                             <el-form-item label="体重（kg）">
                                 <el-input v-model="datas.weight" @change="getBmi"></el-input>
                             </el-form-item>

                             <el-form-item label="身高（cm）">
                                 <el-input v-model="datas.height" @change="getBmi"></el-input>
                             </el-form-item>

                             <el-form-item label="BMI">
                                 <!-- <el-input v-model="datas.bmi" readonly='readonly'></el-input> -->
                                 <div>
                                     {{datas.bmi}}
                                 </div>
                             </el-form-item>


                        </el-form>
                    </div>
                </div>   
               
            </el-card>

            <el-card class="box-card footer-card">
                <div slot="header">
                    <Button  style="float: right; margin-left:20px;" @click="onClose">取消</Button>
                    <Button type="primary" style="float: right;" @click="save">保存</Button>    
                </div>
            </el-card>



        </div>
    </div>
</template>
<script>
import { setCookie, getCookie, delCookie } from '@/common/js/cookie.js';
import { familyTree} from '../../../api/basic/familyTree/familyTree.js';
export default {
    name: "jzxa", //甲状腺癌
    data(){
        return{
            loading: false,
            labelPosition:'left',//表单对齐方式
            sendObj:{              //查找参数
                userId:'',
                familyTreeId:'',
                familyUserId:'',
                cancerId:''
            },
            datas:{
                histopathological_type:'',//组织病理类型
                tnc:'',
                tnm_stage_type:'',//TNM分期
                TNM_T:'',//T
                TNM_N:'',//N
                TNM_M:'',//M
                clinicalAnalysis:'',//分期结果
                surgery:'',//手术方案
                noMa:"2",//是否有先天性巨结肠
                radioiodine_therapy:'',//是否使用放射碘治疗
                noMMN:"2",//是否有多发性粘膜神经瘤
                noCLN:"2",//是否有颈部淋巴结肿大
                yesCancer:"2",//双侧患癌
                lateral_cancer_age:'',//对侧患癌年龄
                noUM:"2",//单侧多灶性
                noIr:"2",//是否为碘抵抗
                noCLT:"2",//是否有慢性淋巴细胞性甲状腺炎
                noFt:"2",//是否有纤维性甲状腺炎
                noHyper:"2",//是否有甲状腺功能亢进
                noCMAL:"2",//是否有皮肤苔藓淀粉样病变
                noTarget:"2",//是否进行过靶向治疗
                noMs:"2",//是否有马凡样体形
                noST:"2",//是否有亚急性甲状腺炎
                noAut:"2",//患有腺瘤性息肉
                adenomatous_polyps_num:'',//患有腺瘤性息肉个数
                noSco:"2",//胃肠道错构瘤/神经节瘤
                scoNum:'',//胃肠道错构瘤/神经节瘤个数
                noDys:"2",//食道糖原棘皮症
                glycogen_num:'',//食道糖原棘皮症个数
                noLipoma:"2",//患有脂肪瘤
                lipoma_num:'',//患有脂肪瘤个数
                noForehead:"2",//患有前额斑块
                noCorT:"2",//脑皮质结节
                noEnamel:"2",//牙釉质凹陷
                noPreP:"2",//错构瘤性直肠息肉
                noMSC:"2",//“斑驳状”皮肤改变
                noNRHo:"2",//非肾脏错构瘤
                noPD:"2",//视网膜色素缺失斑块
                noRe:"2",//患多发性或双侧性先天性视网膜色素上皮肥大
                genital_anomaly:[],//生殖器官异常
                noSpots:"2",//色素脱失斑
                pigmentation_num:'',//色素脱失斑个数
                noLD:"2",//成人 Lhermitte– Duclos病史
                noAcr:"2",//肢端肥大症
                noBN:"2",//蓝痣（多发）
                noTN:"2",//多发性甲状腺结节
                noMD:"2",//智力损伤（IQ≤75）
                noVA:"2",//血管异常（包括多发颅内静脉发育异常）
                big_head_deformities:'',//大头畸形
                noShagreen:"2",//鲛鱼皮斑（结缔组织痣）
                noSub:"2",//室管膜下结节
                noACD:"2",//原发性色素性结节状肾上腺皮质病
                noBC:"2",//骨囊肿
                noMRC:"2",//多发性肾囊肿
                juvenile_family:'2',//幼年性息肉病家族史
                noWMB:"2",//脑白质辐射状移行线
                noOAS:"2",//确诊为成年早老综合征
                noSkin:"2",//皮肤色素沉着：嘴唇、眼结膜、内外锥体、阴道或阴茎黏膜
                trichilemoma:false,//毛鞘瘤
                trichilemoma_number:'2',//毛鞘瘤数量
                acrokeratoderma:false,//肢端角化
                trichilemoma_number:'2',//肢端角化数量
                mucocutaneous_neuromata:false,//皮肤黏膜神经瘤
                trichilemoma_number:'2',//皮肤黏膜神经瘤数量
                oral_papilloma:false,//口腔乳头瘤
                trichilemoma_number:'2',//口腔乳头瘤数量
                results:[{
                    assay_type: '',
                    detection_result_gene: "",
                    detection_result_trans:"",
                    detection_result_varia: "",
                    functional_change: '',
                    other_function_change: "",
                    mutation_type: '',
                }],
                smoking: "2",
                drink: "2",
                vegetable_consum: '',
                fatty_meat: "2",
                dec: '',
                drink_cycle: '',
                bmi: '',
                height: '',
                weight: '',
                smoking_cycle: '',
                smoking_year: ''

            }
        }
    },
    components: {

    },
    created() {
       
    },
    mounted(){
        document.title = "甲状腺癌辅助信息";
        this.getOneById()
        this.getBmi();
        this.loading = true;
        familyTree.findOneFromCancer(this.sendObj).then(res=>{
            console.log(res)
            if(res.returnCode == 0 || res.returnCode == 200){
                if(res.data && res.data.familyCancer){
                    this.datas = res.data.familyCancer;
                }
            }else{
                this.$Message.error(res.msg);
            }
            this.loading = false;
        }).catch(error => {
            this.loading = false;
        });
    },
    methods:{
        onClose() {
            window.close();
        },
        //功能改变
        goBackSelect(row){
           row.functional_change= ''
        },
        addGen(row){
            let obj = {
                assay_type: '',
                detection_result_gene: "",
                detection_result_trans:"",
                detection_result_varia: "",
                functional_change: '',
                other_function_change: "",
                mutation_type: '',
            };
             ++row;
            this.datas.results.splice(row,0,obj)
        },
        changeTNMPG(){
            let result = this.datas.TNM_T + this.datas.TNM_N + this.datas.TNM_M
            let flag = this.datas.tnm_stage_type
            let TChoice = this.datas.TNM_T,
                NChoice = this.datas.TNM_N,
                MChoice = this.datas.TNM_M
            if(flag == "1"){
                if(this.datas.TNM_M == "M0"){
                    this.datas.clinicalAnalysis = result + " " + "Ⅰ期"
                }else if(this.datas.TNM_M == "M1"){
                    this.datas.clinicalAnalysis = result + " " + "Ⅱ期"   
                }
                
            }else if(flag == "2"){
                if(this.datas.TNM_T == 'T1' && NChoice == "N0" && MChoice =="M0"){
                    this.datas.clinicalAnalysis = result + " " + "Ⅰ期"
                }else if(TChoice == "T2" && NChoice == "N0" && MChoice =="M0"){
                    this.datas.clinicalAnalysis = result + " " + "Ⅱ期"
                }else if((NChoice == "N1a" && MChoice =="M0" && (TChoice == "T1" || TChoice == "T2" || TChoice == "T3")) ||
            (TChoice == "T3" && NChoice == "N0" && MChoice =="M0")){
                    this.datas.clinicalAnalysis = result + " " + "Ⅲ期"
                }else if(
            (TChoice == "T4a" && MChoice =="M0" && (NChoice == "N0" || NChoice == "N1a")) ||
            (NChoice == "N1b" && MChoice =="M0" && (TChoice == "T1" || TChoice == "T2" || TChoice == "T3"))
            ){
                    this.datas.clinicalAnalysis = result + " " + "ⅣA期"
                }else if(TChoice == "T4b" && MChoice == "M0"){
                    this.datas.clinicalAnalysis = result + " " + "ⅣB期"
                }else if(MChoice == "M1"){
                    this.datas.clinicalAnalysis = result + " " + "ⅣC期"
                }
            }else if(flag == "3"){
                if(TChoice == "T1" && NChoice == "N0" && MChoice =="M0"){
                    this.datas.clinicalAnalysis = result + " " + "Ⅰ期"
                }else if((TChoice == "T2" || TChoice == "T3") && NChoice =="N0" && MChoice =="M0"){
                    this.datas.clinicalAnalysis = result + " " + "Ⅱ期"
                }else if(NChoice == "N1a" && MChoice =="M0" && (TChoice == "T1" || TChoice == "T2" || TChoice == "T3")){
                    this.datas.clinicalAnalysis = result + " " + "Ⅲ期"
                }else if(
                    (TChoice == "T4a" && MChoice =="M0" && (NChoice == "N0" || NChoice == "N1a")) ||
                    (NChoice == "N1b" && MChoice =="M0" && (TChoice == "T1" || TChoice == "T2" || TChoice == "T3"))
                ){
                    this.datas.clinicalAnalysis = result + " " + "ⅣA期"
                }else if(TChoice == "T4b" && MChoice == "M0"){
                    this.datas.clinicalAnalysis = result + " " + "ⅣB期"
                }else if(MChoice == "M1"){
                    this.datas.clinicalAnalysis = result + " " + "ⅣC期"
                }
            }else if(flag == "4"){
                if(TChoice == "T4a" && MChoice =="M0"){
                    this.datas.clinicalAnalysis = result + " " + "ⅣA期"
                }else if(TChoice == "T4b" && MChoice == "M0"){
                    this.datas.clinicalAnalysis = result + " " + "ⅣB期"
                }else if(MChoice == "M1"){
                    this.datas.clinicalAnalysis = result + " " + "ⅣC期"
                }
            }else{
                this.datas.clinicalAnalysis = result + " " + "无分期"
            }
        },
        removeGen(row){
            if (this.datas.results.length <= 1) {
                this.$Message.info("最少为一条，不可删除了");
                return;
            }
            this.datas.results.splice(row,1)
        },
        tableRowClassName(row,index){
            row.index = index
        },
        save(){
            console.log(222)
            let saveObj = {
                cancerId:this.sendObj.cancerId,
                familyTreeId:this.sendObj.familyTreeId,
                userId:this.sendObj.userId,
                familyUserId:this.sendObj.familyUserId,
                familyCancer:this.datas
            }
            this.loading = true;
           familyTree.saveOrUpdateCancerForm(saveObj).then((res)=>{
                if(res.returnCode == 0 || res.returnCode == 200){
                     this.$Message.success("保存"+res.msg);
                }else{
                    this.$Message.error(res.msg);
                }
                this.loading = false;
            }).catch(error => {
                this.loading = false;
            }); 
        },
        getBmi(){
            let bmi = Math.round((this.datas.weight/Math.pow((this.datas.height/100),2))*100)/100;
            if( isNaN(bmi) || bmi == Infinity){
                this.datas.bmi="";
            }else{
                this.datas.bmi=bmi;
            }
        },
        getOneById(){
            let obj = M.url()
            this.sendObj.cancerId = obj.cancerId
            this.sendObj.familyTreeId = obj.familyTreeId
            this.sendObj.userId = getCookie("userid")
            this.sendObj.familyUserId = obj.current_personid
        }
    }
}
</script>
